<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <p:growl  autoUpdate="true" globalOnly="true" id="msg"/>

        <p:layout fullPage="true">
            <p:layoutUnit position="north" size="100" >
                <h:panelGrid style="margin:auto auto" >
                    <p:toolbar>
                        <p:toolbarGroup align="right">
                            <h:form style="display: inline">
                                <p:commandButton value="Home" action="index" icon="ui-icon-home" immediate="false" process="@this" ajax="false"/>
                            </h:form>
                            <p:separator/>
                            <h:form style="display: inline">
                                <p:autoComplete value="#{buscaPagina.paginaEscolhida}" 
                                                completeMethod="#{buscaPagina.autoPagina}"
                                                var="page"
                                                itemValue="#{page}"
                                                itemLabel="#{page.toString()} #{page.referenciaPagina}"
                                                converter="paginaConversor"/>
                                <p:commandButton value="Ir" action="#{buscaPagina.paginaEscolhida.getUrl()}"  icon="ui-icon-search" ajax="false"/>
                            </h:form>
                        </p:toolbarGroup>

                        <p:toolbarGroup align="left">
                            <p:ajaxStatus style="width:32px;height:32px;margin: 25% 30%"  id="ajaxStatusPanel">  
                                <f:facet name="start" >  
                                    <h:graphicImage url="/resources/ajaxloading.gif" /> 
                                </f:facet>  

                                <f:facet name="default" >  
                                    <h:outputText styleClass="ui-icon ui-icon-bullet" />
                                </f:facet>

                                <f:facet name="complete" >  
                                    <h:outputText styleClass="ui-icon ui-icon-check" />
                                </f:facet>

                                <f:facet name="error">  
                                    <h:outputText styleClass="ui-icon ui-icon-close" />
                                </f:facet>
                            </p:ajaxStatus>
                        </p:toolbarGroup>
                    </p:toolbar>
                </h:panelGrid>

            </p:layoutUnit>

            <p:layoutUnit position="east" size= "100" >
            
            </p:layoutUnit>

            <p:layoutUnit position="west" size="100" >
            
            </p:layoutUnit>

            <p:layoutUnit position="center">
            Mudança Manual via web
            
                <ui:insert id="centro" name="centro" />

            </p:layoutUnit>

            <p:layoutUnit position="south" size="100">
                
            
            </p:layoutUnit>
        </p:layout>
    </h:body>
</html>

